package com.zhj.interview;

/**
 * @author zhj
 * @create 2023-12-01-14:54
 */
public class Test24 {

    public static void main(String[] args) {
        Thread shutdownHook = new Thread(()->{
            System.out.println("优雅停机执行");
        });
        Runtime.getRuntime().addShutdownHook(shutdownHook);
    }
}
